package com.bt7274.pojo;

import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

/**
 * <p>
 * 用户表，保存本系统普通用户的基本信息
 * </p>
 *
 * @author hp
 * @since 2025-03-25
 * {@code update} 2025-4-27
 */
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;

    /**
     * 用户名
     */
    private String username;

    /**
     * 用户密钥（用于生成种子URL）
     */
    private String passkey;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 登陆密码
     */
    private String password;

    /**
     * 用户等级ID，分别为0，1，2，3，4，5，6，7
     */
    private Integer permissionGroup;

    /**
     * 邀请人ID
     */
    private String invitedBy;

    /**
     * 更新时间
     */
    private LocalDateTime updatedTime;

    /**
     * 注册时间
     */
    private LocalDateTime createdTime;



    /**
     * 账号状态。0：正常，1：封禁
     */
    private Integer status;

    private String avatarUrl;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPasskey() {
        return passkey;
    }

    public void setPasskey(String passkey) {
        this.passkey = passkey;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getPermissionGroup() {
        return permissionGroup;
    }

    public void setPermissionGroup(Integer permissionGroup) {
        this.permissionGroup = permissionGroup;
    }

    public String getInvitedBy() {
        return invitedBy;
    }

    public void setInvitedBy(String invitedBy) {
        this.invitedBy = invitedBy;
    }

    public LocalDateTime getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(LocalDateTime updatedTime) {
        this.updatedTime = updatedTime;
    }

    public LocalDateTime getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(LocalDateTime createdTime) {
        this.createdTime = createdTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }
    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    @Override
    public String toString() {
        return "User{" +
        "id = " + id +
        ", username = " + username +
        ", passkey = " + passkey +
        ", email = " + email +
        ", password = " + password +
        ", permissionGroup = " + permissionGroup +
        ", invitedBy = " + invitedBy +
        ", updatedTime = " + updatedTime +
        ", createdTime = " + createdTime +
        ", status = " + status +
        ", avatarUrl = " + avatarUrl +
        "}";
    }





}
